package org.nstack.kvm;

import org.springframework.http.HttpMethod;
import org.nstack.header.host.APIAddHostEvent;
import org.nstack.header.host.APIAddHostMsg;
import org.nstack.header.message.APIParam;
import org.nstack.header.rest.RestRequest;


@RestRequest(
        path = "/hosts/kvm",
        method = HttpMethod.POST,
        parameterName = "params",
        responseClass = APIAddHostEvent.class
)
public class APIAddKVMHostMsg extends APIAddHostMsg {

    @APIParam(maxLength = 255)
    private String username;

    @APIParam(maxLength = 255)
    private String password;



    @APIParam(numberRange = {1, 65535}, required = false)
    private int sshPort = 22;

    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public int getSshPort() {
        return sshPort;
    }

    public void setSshPort(int sshPort) {
        this.sshPort = sshPort;
    }
 
    public static APIAddKVMHostMsg __example__() {
        APIAddKVMHostMsg msg = new APIAddKVMHostMsg();
        msg.setUsername("userName");
        msg.setPassword("password");
        msg.setSshPort(22);
        msg.setClusterUuid(uuid());
        msg.setName("newHost");
        msg.setManagementIp("127.0.0.1");
        return msg;
    }

}
